<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<%----------------------------导航栏--------------------------%>
<head>
	<jsp:include page="layout/_import.jsp"></jsp:include>
	<link rel="stylesheet" href="css/login.css">
	<title>登录界面</title>
</head>
<body>
<%-----------------------------banner----------------------------%>
<jsp:include page="layout/_nav.jsp"></jsp:include>
<header>
	<div class="jumbotron jumbotron-fluid">
		<div class="container">
			<h1 class="display-4">社区宠物诊所·登录</h1>
			<p class="lead">This is a community pet hospital, where pets can have family like warmth and join us</p>
		</div>
	</div>
</header>
<main>
	<div class="container">
		<c:if test="${not empty msg}">
			<div class="alert alert-danger" role="alert">
				${msg}
			</div>
		</c:if>
		<form action="login" method="post">
			<div class="row">
				<span class="col col-md-2">
					用户名
				</span>
				<div class="col col-md-10">
					<input type="text" class="form-control" name="name">
				</div>
			</div>
			<div class="row">
				<span class="col col-md-2">
					密码
				</span>
				<div class="col col-md-10">
					<input type="password" class="form-control" name="pwd">
				</div>
			</div>
			<div class="row">
				<span class="col col-md-2">
					验证码
				</span>
				<div class="col col-md-6">
					<input type="text" class="form-control" name="checkcode" autocomplete="off">
				</div>
				<div class="col col-md-4">
					<input type="image" name="img-code" id="img-code" alt="看不清，点击换图" src="CheckCode"
								 onclick="javascript:return changCode(this);">
				</div>
			</div>
			<div class="row">
				<input type="submit" class="btn btn-primary" value="登录"/>
				<input type="reset" class="btn btn-primary" value="重置"/>
			</div>
		</form>
	</div>
</main>
<script>
	function changCode(input) {
        input.src='CheckCode?rand=' + Math.random();
        return false;
    }
</script>
</body>
</html>
